/**
 * El servicio de {@link Feedback}.
 * 
 * @author gvilla
 */

package com.hexacta.hrs.services.feedbacks;

import java.util.Collection;
import java.util.List;

import org.vectrics.employee.Employee;
import org.vectrics.recruiter.job.JobFunction;
import org.vectrics.user.Person;

import com.hexacta.hrs.domain.feedback.Feedback;
import com.hexacta.hrs.domain.feedback.Period;
import com.hexacta.hrs.domain.staffing.assignment.EmployeeAssignment;

public interface FeedbackService {

    /**
     * Busca todos los feedbacks, abiertos o cerrados independientemente del
     * per�odo
     * 
     * @return todos los feedbacks
     */
    public Collection<Feedback> findAll();

    /**
     * Busca todos los feedbacks que tengan propiedades que matcheen los
     * par�metros.
     * 
     * @param evaluated
     * @param role
     * @param mentor
     * @return los feedbacks que matcheen los par�metros
     */
    public Collection<Feedback> findWith(Employee evaluated, JobFunction role, Employee mentor);

    public Collection<Feedback> findFeedbacksWithCriteria(Period period, Long signinPersonId, Long employeeId,
            Long projectId, String string, Long mentorId, Long evaluatorId);

    public Collection<Employee> findAllEvaluators();

    public boolean feedbackExist(Long evaluatedeId, Long evaluatorId, String projectName);

    /**
     * Guarda Modificaciones del feedback
     * 
     * @param feedback
     */
    void update(Feedback feedback);

    void setFeedbackSkill(Long feedbackId, String skillType, String commentPros, String commentCons);

    public void save(Feedback feedback);

    void setFeedbackEffort(Long feedbackId, String effortScore, String justification);

    void setFeedbackScore(Long feedbackId, String score);

    void delete(Long feedbackId);

    public List<Feedback> getPendingFeedbacksForRole(String role);

    public List<Feedback> getPendingFeedbacks();

    public void addFeedbackFromAssignment(EmployeeAssignment assignment);

    /**
     * @param assignment
     * @param currentUser
     */
    public void deleteFeedbackForAssignment(EmployeeAssignment assignment, Person currentUser);

    /**
     * @param assignment
     * @param person
     */
    public void updateFeedbacksForASsignment(EmployeeAssignment assignment, Person currentUser);
}
